import React, { useEffect } from "react";
import { useLocation, useNavigate } from "react-router-dom";
import { NavBar, Space, Toast } from "antd-mobile";
import styles from "./index.module.css"
import http from "../../api/http";
function Index() {
  const navigate = useNavigate();
  const { id } = useLocation();
  // console.log(id)
  const getDeitleList = async () => {
    const res = await http.get("/api/trip/train/deitle", { params: { id } });
    const { data } = res.data;
    console.log(data);
  };

  useEffect(() => {
    getDeitleList();
  }, []);
  return (
    <div>
      <NavBar onBack={() => navigate(-1)}>车票详情页</NavBar>
      <div>
        <div className={styles.list_left} >
          <span>北京</span>
          <span>广州</span>
          <span>2025-7-21</span>
          <span>
            VIP座 <b>有票</b>
          </span>
          <span>
            一等座 <b>有票</b>
          </span>
          <span>
            二等座 <b>有票</b>
          </span>
        </div>
       
      </div>
    </div>
  );
}

export default Index;
